package com.wh.accesscontrol.service.lmpl;

import com.wh.accesscontrol.dao.TotalMapper;
import com.wh.accesscontrol.entity.Total;
import com.wh.accesscontrol.service.TotalService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("TotaServiceImpl")
public class TotalServiceImpl implements TotalService {
    @Autowired
    TotalMapper totalMapper;
    @Override
    public boolean add(Total total) {
        if (totalMapper.insert(total)>0){
            return true;
        }
        return false;
    }

    @Override
    public List<Total> selectAll() {
        return totalMapper.selectAll();
    }

    @Override
    public List<Total> selectAllDay(int unit) {
        return totalMapper.selectAllDay(unit);
    }
/**
 * <h3>AccessControl</h3>
 * <p></p>
 * @author : WH
 * @date : 2020-03-27 14:36
 **/


}
